package state;

/**
 * @author wcj
 * @Date 2021/6/30 22:20
 * @Version 1.0
 */
public class TowardState extends State {

    @Override
    public void writeProgram(Work work) {
        if (work.getHour() < 19) {
            System.out.println("傍晚工作，马上就要下班了!");
        } else {
            work.setCurrent(new NightState());
            work.writeProgram();
        }
    }
}
